package it.koutifaris.travianmap.ui;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import it.koutifaris.travianmap.ui.viewstate.ViewStateImpl;
import android.test.AndroidTestCase;

public class AbstractSquaredViewportBoundsTest extends AndroidTestCase {

	protected static final int SQUARE_SIZE = 10;

	protected ViewStateImpl originCenteredViewState() {
		return viewState(0, 0);
	}

	protected ViewStateImpl viewState(int x, int y) {
		ViewStateImpl viewState = mock(ViewStateImpl.class);

		when(viewState.getX()).thenReturn(x);
		when(viewState.getY()).thenReturn(y);
		when(viewState.getZoom()).thenReturn(1f);
		when(viewState.getSquareSize()).thenReturn(SQUARE_SIZE);

		return viewState;
	}

}
